define(
    function (require) {
        require('tpl!./form.tpl.html');

        var util = require('common/util');

        var BaseFormView = require('common/FormView');

        function FormView() {
            BaseFormView.apply(this, arguments);
        }

        FormView.prototype.template = 'shopForm';

        FormView.prototype.enterDocument = function() {
            BaseFormView.prototype.enterDocument.apply(this, arguments);
        };

        /**
         * 从表单中获取实体数据
         *
         * @return {Object}
         */
        FormView.prototype.getEntity = function () {
            var entity = BaseFormView.prototype.getEntity.apply(this, arguments);
            var flg =false;
            alert($("#password").val());
            if(flg){
                return entity;
            }

        };

        /**
        function getAreaCode() {
            var cityControl = this.get('city');
            var cityValue = cityControl.getValue();
            var city = util.findWhere(
                this.model.get('cityList'),
                {
                    value: parseInt(cityValue, 10)
                }
            );
            return city.areaCode || '021';
        }
        */

        require('er/util').inherits(FormView, BaseFormView);
        return FormView;
    }
);
